package com.builder;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import com.model.Envase;
import com.view.EnvaseView;

@SuppressWarnings("serial")
@ManagedBean
@ViewScoped
public class EnvaseBuilder extends BaseBuilder<EnvaseView, Envase> {

	public Envase toDomain(EnvaseView view) {
		return new Envase(view.getId(), view.getDescripcion());
	}

	public EnvaseView toView(Envase model) {
		return new EnvaseView(model.getID(), model.getDescripcion());
	}
}
